// import Vue from 'vue'
import { createRouter, createWebHashHistory } from "vue-router";
import { beforeRouteEntry } from "@/router/routeGuard.js"
import config from "@/config";
const router = createRouter({
	history: createWebHashHistory(),
	scrollBehavior: () => ({ top: 0, left: 0 }),
	routes: [
		//默认横屏模式
		{
			path: '/',
			redirect: '/horvsreen'
		},
		//横屏模式
		{
			path: '/horvsreen',
			name: 'horvsreen',
			component: () => import(/* webpackChunkName: "horvsreen" */ '../pages/horvsreen/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 大屏
		{
			path: '/largescreen',
			name: 'largescreen',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/largescreen/index.vue'),
			meta: { title: config.systemName, remType: 'LARGESCREEN' }
		},
		// 竖屏
		{
			path: '/largeverscreen',
			name: 'largeverscreen',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/largeverscreen/index.vue'),
			meta: { title: config.systemName, remType: 'LARGENARROWSCREEN' }
		},
		// 基础设施老屏
		// 	{
		// 		path: '/infrastructure',
		// 		name: 'infrastructure ',
		// 		component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/infrastructure/index.vue'),
		// 		meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		// },
		// 基础设施新屏
		{
			path: '/infrastructure',
			name: 'infrastructure',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/infrastructure/indexnew.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 应用监控
		{
			path: '/application',
			name: 'application',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/application/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 应用建设
		{
			path: '/construction',
			name: 'construction',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/construction/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 业务运维
		{
			path: '/operationBusiness',
			name: 'operationBusiness',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/operationBusiness/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 智能运维
		{
			path: '/intelligence',
			name: 'intelligence',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/operationBusiness/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 云资源情况
		{
			path: '/cloudResources',
			name: 'cloudResources',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/cloudResources/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 数据应用
		{
			path: '/dataApplication',
			name: 'dataApplication',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/dataApplication/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},// 数据应用
		{
			path: '/textIndex',
			name: 'textIndex',
			component: () => import(/* webpackChunkName: "largescreen" */ '@/pages/textIndex/textIndex.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// 数据资产管理
		{
			path: '/dataAssetManagement',
			name: 'dataAssetManagement',
			component: () => import('@/pages/dataAssetManagement/index.vue'),
			meta: { title: config.systemName, remType: 'HORVSREENSCREEN' }
		},
		// {
		// 	path: '/demo',
		// 	name: 'demo ',
		// 	component: () => import(/* webpackChunkName: "demo" */ '@/pages/demo/index.vue'),
		// 	meta: { title: config.systemName,}
		// }
	]
})
router.beforeEach(beforeRouteEntry)
export default router

